<!doctype html> 
<html> 
<head> 
    <meta charset="utf-8"> 
    <title></title> 
    <style type="text/css">
body{font-size: 100px;text-align: center;line-height: 100px;}

    </style>
</head>
<body>
<script type="text/javascript">
	
var a = 10;
//var b = 15;
document.body.innerHTML = a;
t1 = setInterval(function(){
	a--;
	document.body.innerHTML = a;
	if(a == -1){
		document.body.style.background= 'red';
	}
},1000);

onclick = function(){
	a = 10;
}

</script>
</body>
</html>